package com.demo.client.model.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.demo.core.annotation.TableFieldDefaultValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @description TODO 
 * @className SysDept
 * @author Tan-Bowen
 * @date 2021-08-05 11:25
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel ("sys_dept")
@TableName (value ="sys_dept")
public class SysDept implements Serializable {

  private static final long serialVersionUID = 4814043405073767937L;
  @ApiModelProperty("主键id")
  @TableId(type = IdType.ASSIGN_ID)
  private Long id;

  @ApiModelProperty("父级id")
  @TableFieldDefaultValue(value ="0")
  private Long pid;

  @ApiModelProperty("名称")
  @TableFieldDefaultValue(value ="''")
  private String name;

  @ApiModelProperty("1启用")
  @TableFieldDefaultValue(value ="0")
  private Integer state;

  @ApiModelProperty("联系地址")
  @TableFieldDefaultValue(value ="''")
  private String address;

  @ApiModelProperty("机构描述")
  @TableFieldDefaultValue(value ="''")
  private String remark;

  @ApiModelProperty("创建时间")
  @TableFieldDefaultValue(value ="CURRENT_TIMESTAMP")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @ApiModelProperty("修改时间")
  @TableFieldDefaultValue(value ="CURRENT_TIMESTAMP")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;

  @ApiModelProperty("创建人")
  @TableFieldDefaultValue(value ="0")
  private Long createUser;


}
